def-class class instruments section definition &rest sections definitions
Defines a class for one or more instruments for any number of sections. The classes consist of the following: Symbol, length, tonality, velocity, channel, program, controller and tempo. The instrument names can be supplied as a list of names or a single quoted name. Section names are arbitrary and refer to those root level entities you have defined with def-grammar.
(def-class zone (synth bass)
sect-a '(1/1 1/1 1/1 1/1 1/1 1/1 1/1 1/1)
sect-b '(1/1 1/1 1/1 1/1 1/1 1/1 1/1 1/1)
)
Other classes are defined in a similar way. Each definition may have a number of sublists, each describing the entities used for a zone. If the number of the sublists equal the number of the zones defined for that section, then each zone is uniquely defined, otherwise the definitions are repeated over and over until all the zones are filled. If the definition is a flat list, then all of its contents will run through the zone boundaries. If the flat list contains less elements than needed to fill the section it is repeated. Use distribute to control this distribution in more specific manner.
Here are some more examples.
(def-class length synth
sect-a '((1/8) (1/16))
sect-b '((1/4 1/8) (1/16))
)
(def-class symbol bass
sect-a '((a a a) (b b b))
sect-b '(c c c)
)
When defining classes the zone must be the first class, and the length must be the second class, but after that the definition order is free. Zones and lengths are needed for the internal distributions to work correctly.
FOLLOW ALWAYS THIS ORDER:
zone
length
free
Section Rules
A single list '(1/2 1/8) for a section continues through the zone boundaries at the length of the section. The values in a list are repeated over and over.
(def-class length instr
intro '(1/2 1/8)
)
A nested list '((1/2 1/8)) starts at the beginning of a new zone and repeats through the zone for all zones of the section.
(def-class length instr
intro '((1/2 1/8))
)
A nested list '((1/2 1/4) (1/8 1/4 1/2)) defines the patterns for each zone of the section. If there are more or less nested lists than there are zones, then these are truncated or expanded to match the number of zones. Each zone pattern repeats over and over while the zone lasts.